﻿using FunnyArts.PrettyMain;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Security.Cryptography.Pkcs;


StartProcess("FunnyArts.PrettyClient.exe");

// 等待所有应用程序完成
foreach (var item in ProcessDict.processDict)
{
    item.Value.WaitForExit();
}
//Process.GetCurrentProcess().WaitForExitAsync();

static void StartProcess(string fileName)
{
    Process process = new Process();
    process.StartInfo.FileName = fileName;
    process.Start();

    ProcessDict.processDict.AddOrUpdate(process.Id, process,(s, p) => process);
}